package edu.stu.mall.fragment.personal


import android.util.Log
import edu.mall.base.BaseFragment
import edu.stu.mall.BR
import edu.stu.mall.R
import edu.stu.mall.databinding.FragmentPersonalBinding
import edu.stu.mall.service.loadImage


class FragPersonal : BaseFragment<FragmentPersonalBinding, FragPersonalViewModel>() {
    override fun getLayoutId(): Int {
        return R.layout.fragment_personal

    }

    override fun getViewModelId(): Int {
        return BR.personalVm

    }

    override fun initViewData() {
        viewModel?.userInfo?.observe(viewLifecycleOwner) {
            binding?.tvGrowth?.text = it?.growth.toString()
            binding?.tvIntegration?.text = it?.integration.toString()
            binding?.tvNickname?.text = it?.nickname.toString()
            loadImage(it?.icon, binding!!.ivIcon)

        }


    }

}